//
//  CommonTool.h
//  iCJTools
//
//  Created by AnDa-Y on 2021/2/8.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface CommonTool : NSObject

@end

@interface NSObject (Private)

- (id)getProperty:(NSString *)propertyName;

@end

@interface NSString (CJ)

- (NSMutableAttributedString *)attributedStringWithLineSpacing:(CGFloat)lineSpacing;
- (NSMutableAttributedString *)attributedStringWithHeadIndent:(CGFloat)headIndent;

- (BOOL)isMobilePhoneNumber;


/**
 *  验证是否可用密码字符串(数字/大写字母/小写字母)
 */
@property (nonatomic, readonly) BOOL isVerificationPasswordCharacter;

/**
 *  判断是否为纯数字
 */
@property (nonatomic, readonly) BOOL isPureNumber;

/**
 *  判断是否为浮点数
 */
@property (nonatomic, readonly) BOOL isPureFloat;

//根据宽,算高
- (CGFloat)heightForWidth:(CGFloat)width font:(UIFont *)font;

//根据高,算宽
- (CGFloat)widthForHeight:(CGFloat)height font:(UIFont *)font;

// 验证手机号码
- (BOOL)isMobileNumber;

// 验证密码格式
- (BOOL)isValidPassword;

// 是否字母
- (BOOL)isCapital;


//字符串是否全是空格
-(BOOL)isAllSpaceWithString:(NSString*)str;


- (BOOL)checkPhoneNumInput;

//emoji
- (BOOL)containsEmoji;

- (BOOL)isIncludingEmoji;

/**
 *  移除Emoji表情
 *
 */
- (NSString *)removeEmoji;

@end

@interface NSDate (Common)

- (BOOL)isToday;

- (BOOL)isYesterday;

- (NSString *)shortTimeTextOfDate;

- (NSString *)timeTextOfDate;

@end

@interface UIDevice (Common)
- (NSString *)deviceType;
@end

NS_ASSUME_NONNULL_END
